package com.lifeonwalden.copula.bean;

import java.math.BigDecimal;

public class OptimizeResult {
    /* The solution of the optimization. */
    private BigDecimal x;

    /* Values of objective function, its Jacobian and its Hessian (if available). The Hessians may be approximations, see the documentation of the function in question. */
    private BigDecimal fun;
    private BigDecimal jac;
    private BigDecimal hess;

    /* Number of evaluations of the objective functions and of its Jacobian and Hessian. */
    private int nfev;
    private int njev;
    private int nhev;

    /* Number of iterations performed by the optimizer. */
    private int nit;

    private boolean fundSolution = false;

    public BigDecimal getX() {
        return x;
    }

    public OptimizeResult setX(BigDecimal x) {
        this.x = x;
        return this;
    }

    public BigDecimal getFun() {
        return fun;
    }

    public OptimizeResult setFun(BigDecimal fun) {
        this.fun = fun;
        return this;
    }

    public BigDecimal getJac() {
        return jac;
    }

    public OptimizeResult setJac(BigDecimal jac) {
        this.jac = jac;
        return this;
    }

    public BigDecimal getHess() {
        return hess;
    }

    public OptimizeResult setHess(BigDecimal hess) {
        this.hess = hess;
        return this;
    }

    public int getNfev() {
        return nfev;
    }

    public OptimizeResult setNfev(int nfev) {
        this.nfev = nfev;
        return this;
    }

    public int getNjev() {
        return njev;
    }

    public OptimizeResult setNjev(int njev) {
        this.njev = njev;
        return this;
    }

    public int getNhev() {
        return nhev;
    }

    public OptimizeResult setNhev(int nhev) {
        this.nhev = nhev;
        return this;
    }

    public int getNit() {
        return nit;
    }

    public OptimizeResult setNit(int nit) {
        this.nit = nit;
        return this;
    }

    public boolean isFundSolution() {
        return fundSolution;
    }

    public OptimizeResult setFundSolution(boolean fundSolution) {
        this.fundSolution = fundSolution;
        return this;
    }
}
